import request from '@/utils/request'

// 查询车辆浏览列表
export function listVisit(query) {
  return request({
    url: '/scp/visit/list',
    method: 'get',
    params: query
  })
}

// 查询车辆浏览详细
export function getVisit(visitId) {
  return request({
    url: '/scp/visit/' + visitId,
    method: 'get'
  })
}

export function selectVisit(carId) {
  return request({
    url: '/scp/visit/selectVisit/' + carId,
    method: 'get'
  })
}

// 新增车辆浏览
export function addVisit(data) {
  return request({
    url: '/scp/visit',
    method: 'post',
    data: data
  })
}

// 修改车辆浏览
export function updateVisit(data) {
  return request({
    url: '/scp/visit',
    method: 'put',
    data: data
  })
}

// 删除车辆浏览
export function delVisit(visitId) {
  return request({
    url: '/scp/visit/' + visitId,
    method: 'delete'
  })
}
